home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Fun House 1
/
CD Fun House (Wayzata Technology).iso
/
•AdventureLand•
/
Adventures
/
HyperQuest 1.03 •••
/
HyperQuest 1.03 еее
/
background_2766.txt
< prev
next >
Wrap
Text File
|
1990-10-02
|
17KB
|
713 lines
-- background: 2766 from stack: in.03 –µ–µ–µ
-- bmap block id: 15025
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on cardOpened
global cardID,object,takeFlag,examFlag,prevID,invFlag,holdID,blasting
global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc
-- Do any actions here that need to be done for each card opening
set the cursor to 4
hide menuBar
set the blindTyping to false
get id of card
put last word of it into room
if field init = 1 then
--initialize the room
put 0 into field init
repeat with butNum = 1 to 7
get the icon of card button butNum
if it<>0 then hide card button butNum
end repeat
if knifeLoc=room then show card button knife
if ladderLoc=room then show card button ladder
if noduleLoc=room then show card button nodule
if bombLoc=room then show card button bomb
if gemLoc=room then show card button gem
if keyLoc=room then show card button key
if orbLoc=room then show card button orb
end if
put false into examFlag
put false into takeFlag
if invFlag then
put false into invFlag
else
put cardID into prevID
end if
-- if 'back' is not allowed, have the move handler place the id of the
-- destination card xxx into cardID before doing 'go to card id xxx'
-- (use also if change of cave makes going back impossible).
put room into cardID
set the scroll of field 1 to 0
put "" into field 3
if blasting<>0 then add 1 to blasting
if blasting=4 then kaBoom
end cardOpened
on take
global takeFlag,examFlag,cardID,object,carried,hortaDead,chase
global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc,invLoc
set the cursor to 4
put false into takeFlag
hide object
set lockScreen to true
push card
go to card id 10613
show object
hide card button "no objects carried"
put last word of object into obj
delete first char of obj
delete last char of obj
put "put invLoc into " & obj & "Loc" into cmdLine
do cmdLine
pop card
add 1 to carried
if obj="nodule" and hortaDead="false" then put 1 into chase
put "taken" into field 3
end take
on drop
global dropFlag,cardID,object,dropRoom,chase,causeOfDeath
global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc,invLoc
set the cursor to 4
put false into dropFlag
put last word of object into obj
delete first char of obj
delete last char of obj
if chase=2 then
if obj="nodule" then
visual wipe up slowly to gray
put "horta5" into causeOfDeath
else
visual wipe up slowly to gray
put "horta3" into causeOfDeath
end if
go card id 3409
exit drop
end if
if obj="nodule" and chase=1 then put 0 into chase
if dropRoom=cardID then
show object
else
if dropRoom=7465 then
put "The object falls out of sight into the pit, although you faintly hear it hitting the sides of the pit for almost half a minute." into field 3
exit drop
end if
put last word of object into obj
delete first char of obj
delete last char of obj
show card button obj of card id dropRoom
end if
put "put dropRoom into " & obj & "Loc" into cmdLine
do cmdLine
put "dropped" into field 3
end drop
on use
global useFlag,examFlag,cardID,object,prevID,holdID
global chase,causeOfDeath,blasting
set the cursor to 4
put last word of object into obj
delete first char of obj
delete last char of obj
put false into useFlag
if chase=2 then
put "horta3" into causeOfDeath
visual wipe up slowly to gray
go card id 3409
exit use
end if
if obj = "key" then
put "You better find a lock before trying to use the key." into field 3
exit use
end if
if obj = "knife" then
put "You wildly brandish the knife. Mildly impressive, but it serves no purpose here." into field 3
exit use
end if
if obj = "gem" then
put prevID into holdID
visual effect iris open very fast to white
visual effect iris open to white
visual effect dissolve
go to card id cardID
put holdID into prevID
put "You find that by concentrating on the gem, you are able to cause it to emit a bright flash that hurts your eyes." into field 3
exit use
end if
if obj = "ladder" then
put "You must find something suitable to tie the ladder to if you want to use it." into field 3
exit use
end if
if obj = "nodule" then
put "I can't see how you intend to use the silicon nodule." into field 3
exit use
end if
if obj = "bomb" then
put "The bomb is ticking. I strongly suggest you drop it and run." into field 3
if cardID="27851" then
put 1 into blasting
else
put 2 into blasting
end if
exit use
end if
if obj = "orb" then
go to card id 7465
exit use
end if
put "there is no use for that object in this situation" into field 3
-- update carried somewhere if use leads to loss of item.
end use
on move
global direction,cardID,prevID
if direction = "back" then
if cardID = prevID then
beep
put "There's no going back in this situation." into field 3
exit move
end if
go to card id prevID
exit move
end if
beep
if direction = "rear" then
put "Sorry, there is no 'rear' exit behind you in this view." into field 3
exit move
end if
if direction<>"enter" and direction<>"exit"
then
put "Sorry, you can't go that way." into field 3
else
put "Use enter and exit for entering or leaving something," into field 3
put " such as a car, boat, or building." after field 3
end if
end move
on roomChange
global cardID,oldRoom,newRoom
global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc
set the cursor to 4
if knifeLoc=oldRoom then
hide card button "knife" of card id oldRoom
show card button "knife" of card id newRoom
put newRoom into knifeLoc
end if
if noduleLoc=oldRoom then
hide card button "nodule" of card id oldRoom
show card button "nodule" of card id newRoom
put newRoom into noduleLoc
end if
if ladderLoc=oldRoom then
hide card button "ladder" of card id oldRoom
show card button "ladder" of card id newRoom
put newRoom into ladderLoc
end if
if bombLoc=oldRoom then
hide card button "bomb" of card id oldRoom
show card button "bomb" of card id newRoom
put newRoom into bombLoc
end if
if keyLoc=oldRoom then
hide card button "key" of card id oldRoom
show card button "key" of card id newRoom
put newRoom into keyLoc
end if
if gemLoc=oldRoom then
hide card button "gem" of card id oldRoom
show card button "gem" of card id newRoom
put newRoom into gemLoc
end if
end roomChange
on kaBoom
global blasting,cardID,prevID,causeOfDeath,bombLoc,invLoc
global blastWall,blastDam,flood,hortaDead,oldRoom,newRoom
put 0 into blasting
put cardID into temp
if bombLoc = invLoc then
put "bomb1" into causeOfDeath
put 3409 into temp
end if
if bombLoc = cardID then
put "bomb2" into causeOfDeath
put 3409 into temp
end if
hide card button bomb of card id prevID
visual effect iris open fast to white
visual effect iris open very fast to black
visual effect iris open very fast to white
visual effect dissolve slowly to white
visual effect dissolve
put cardID into prevID
beep
go to card id temp
if temp = 3409 then exit kaBoom
put "The bomb goes off in a nearby room. The shock of the blast knocks you unconcious (How long? Hard to say -- minutes? hours?)" into field 3
if bombLoc=24636 then
if cardID=25762 then
put "bomb3" into causeOfDeath
go to card id 3409
exit kaBoom
end if
put true into blastWall
if flood then
put false into flood
put 29888 into oldRoom
put 29230 into newRoom
roomChange
put 31445 into oldRoom
put 30913 into newRoom
roomChange
put 31944 into oldRoom
put 2539 into newRoom
roomChange
put 12023 into oldRoom
put 7465 into newRoom
roomChange
else
put 12023 into oldRoom
put 12716 into newRoom
roomChange
end if
exit kaBoom
end if
if bombLoc=26200 or bombLoc=27851 then
if cardID=30913 then
put "bomb4" into causeOfDeath
go to card id 3409
exit kaBoom
end if
put true into blastDam
put 30913 into oldRoom
put 33443 into newRoom
roomChange
if blastWall=false then
put true into flood
put 29230 into oldRoom
put 29888 into newRoom
roomChange
put 2539 into oldRoom
put 31944 into newRoom
roomChange
if cardID=29230 then
put 29888 into prevID
go to card id 29888
put "The bomb goes off in a nearby room. The shock of the blast knocks you unconcious (How long? Hard to say -- minutes? hours?)" into field 3
exit kaBoom
end if
end if
exit kaBoom
end if
if bombLoc=12023 then
put true into blastWall
put 24636 into oldRoom
put 25160 into newRoom
roomChange
exit kaBoom
end if
if bombLoc=21738 then
put true into hortaDead
put 21738 into oldRoom
put 7465 into newRoom
roomChange
exit kaBoom
end if
put "bomb5" into causeOfDeath
go to card id 3409
end kaBoom
-- part 1 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=26 top=275 right=294 bottom=72
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: North
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "north" into direction
send move to card id cardID
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=0 top=299 right=318 bottom=47
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: West
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "west" into direction
send move to card id cardID
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=52 top=299 right=318 bottom=99
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: East
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "east" into direction
send move to card id cardID
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=26 top=323 right=342 bottom=72
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: South
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "south" into direction
send move to card id cardID
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=104 top=275 right=294 bottom=151
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Up
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "up" into direction
send move to card id cardID
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=104 top=299 right=318 bottom=151
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Down
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "down" into direction
send move to card id cardID
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=156 top=275 right=294 bottom=203
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Enter
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "enter" into direction
send move to card id cardID
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=208 top=275 right=294 bottom=255
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Take
----- HyperTalk script -----
on mouseUp
global examFlag,takeFlag,carried
put false into examFlag
if carried < 3
then
put "click on the object you want to take" into field 3
put true into takeFlag
else
beep
put "you may only carry 3 items at once" into field 3
end if
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=208 top=299 right=318 bottom=255
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Drop
----- HyperTalk script -----
on mouseUp
global examFlag,useFlag,dropFlag,invLoc
put false into examFlag
put false into useFlag
put true into dropFlag
go to card id invLoc
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=156 top=299 right=318 bottom=203
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Exit
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "exit" into direction
send move to card id cardID
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=260 top=299 right=318 bottom=356
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Use object
----- HyperTalk script -----
on mouseUp
global examFlag,useFlag,dropFlag,invLoc
put false into examFlag
put true into useFlag
put false into dropFlag
go to card id invLoc
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=260 top=275 right=294 bottom=356
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Examine
----- HyperTalk script -----
on mouseUp
global examFlag,takeFlag
put "click on what you want to examine" into field 3
put true into examFlag
put false into takeFlag
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=260 top=323 right=342 bottom=357
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Inventory
----- HyperTalk script -----
on mouseUp
global examFlag,useFlag,dropFlag,invLoc
put true into examFlag
put false into useFlag
put false into dropFlag
go to card id invLoc
end mouseUp
-- part 24 (field)
-- low flags: 01
-- high flags: 2007
-- rect: left=257 top=0 right=172 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 25 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=364 top=286 right=322 bottom=503
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 27 (field)
-- low flags: 01
-- high flags: 2000
-- rect: left=257 top=178 right=267 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 32 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=156 top=323 right=342 bottom=203
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Back
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "back" into direction
send move to card id cardID
end mouseUp
-- part 33 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=104 top=323 right=342 bottom=151
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rear
----- HyperTalk script -----
on mouseUp
global direction,cardID
put "rear" into direction
send move to card id cardID
end mouseUp
-- part 36 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=0 top=324 right=342 bottom=14
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: init